package com.sun.common.core.exception;

import com.sun.common.core.enums.ResponseEnum;

/**
 * @author zhangquanwei
 * @version 1.0
 * @since 2025-03-10 17:46
 */
public class SunPayException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private Object object;

    private ResponseEnum responseEnum;

    public SunPayException(String message) {
        super(message);
    }

    public SunPayException(String message, Object object) {
        super(message);
        this.object = object;
    }

    public SunPayException(String message, Throwable cause) {
        super(message, cause);
    }


    public SunPayException(ResponseEnum responseEnum) {
        super(responseEnum.getMessage());
        this.responseEnum = responseEnum;
    }

    public SunPayException(ResponseEnum responseEnum, Object object) {
        super(responseEnum.getMessage());
        this.responseEnum = responseEnum;
        this.object = object;
    }


    public Object getObject() {
        return object;
    }

    public ResponseEnum getResponseEnum() {
        return responseEnum;
    }

}
